<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

<xsl:template match="/newsfeed">
	<div class="header">
        <div>
            <a href="">Home</a> | 
            <a href="">Logout</a> | 
            <a href="">Preferences</a>
        </div>
        <table>
            <tr>
                <td><h1>EasyCMX</h1></td>
                <td class="al_right">
                    
                </td>
            </tr>
        </table>
    </div>
    
    <h1>News Stories</h1>
    
    <div class="content">
    
        <div class="newsfeed">
        
        <xsl:for-each select="story">
            <xsl:sort select="date/@y" data-type="number" order="descending" />
            <xsl:sort select="date/@m" data-type="number" order="descending" />
            <xsl:sort select="date/@d" data-type="number" order="descending" />
            <xsl:sort select="date/@h" data-type="number" order="descending" />
            <xsl:sort select="date/@m" data-type="number" order="descending" />
            <xsl:sort select="author/last" />
            <xsl:sort select="author/first" />
            <div class="story">
                <div class="title">
                    <xsl:value-of select="title" />
                </div>
                <div class="authdate">
                    by <xsl:value-of select="author/first"/> <xsl:value-of select="author/last"/><br />
                    on <xsl:value-of select="date/@m"/>/<xsl:value-of select="date/@d"/>/<xsl:value-of select="date/@y"/>
                </div>
                <div class="text">
                    <xsl:copy-of select="text" />
                </div>
            </div>
        </xsl:for-each>
        </div>
	</div>

    <div class="footer">
        Copyright 2008. All rights reserved.
    </div>

</xsl:template>
</xsl:stylesheet>